package com.game.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.game.modal.Room;

@Mapper
public interface RoomMapper {
	
	@Insert("INSERT INTO room(room_no,create_time) VALUES(#{roomId},now())")
	int insert(Room room);
	
	@Select("SELECT COUNT(1) FROM room r WHERE r.room_no = #{roomNo}")
	int selectBy(String roomNo);
	
}
